package cn.iocoder.yudao.module.team.dal.mysql.financemonad;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.team.dal.dataobject.financemonad.FinanceMonadDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.team.controller.admin.financemonad.vo.*;

/**
 * 录入单子管理 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface FinanceMonadMapper extends BaseMapperX<FinanceMonadDO> {

    default PageResult<FinanceMonadDO> selectPage(FinanceMonadPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FinanceMonadDO>()
                .eqIfPresent(FinanceMonadDO::getOrderNumbers, reqVO.getOrderNumbers())
                .eqIfPresent(FinanceMonadDO::getOrderId, reqVO.getOrderId())
                .eqIfPresent(FinanceMonadDO::getGuest, reqVO.getGuest())
                .eqIfPresent(FinanceMonadDO::getGuide, reqVO.getGuide())
                .eqIfPresent(FinanceMonadDO::getNumber, reqVO.getNumber())
                .eqIfPresent(FinanceMonadDO::getFare, reqVO.getFare())
                .eqIfPresent(FinanceMonadDO::getMeal, reqVO.getMeal())
                .betweenIfPresent(FinanceMonadDO::getEnterDate, reqVO.getEnterDate())
                .likeIfPresent(FinanceMonadDO::getEnterName, reqVO.getEnterName())
                .eqIfPresent(FinanceMonadDO::getApprovalStatus, reqVO.getApprovalStatus())
                .likeIfPresent(FinanceMonadDO::getApprovalName, reqVO.getApprovalName())
                .eqIfPresent(FinanceMonadDO::getApprovalRemarks, reqVO.getApprovalRemarks())
                .eqIfPresent(FinanceMonadDO::getUrl, reqVO.getUrl())
                .eqIfPresent(FinanceMonadDO::getRemarks, reqVO.getRemarks())
                .eqIfPresent(FinanceMonadDO::getColumn1, reqVO.getColumn1())
                .eqIfPresent(FinanceMonadDO::getColumn2, reqVO.getColumn2())
                .eqIfPresent(FinanceMonadDO::getColumn3, reqVO.getColumn3())
                .eqIfPresent(FinanceMonadDO::getColumn4, reqVO.getColumn4())
                .eqIfPresent(FinanceMonadDO::getColumn5, reqVO.getColumn5())
                .eqIfPresent(FinanceMonadDO::getColumn6, reqVO.getColumn6())
                .betweenIfPresent(FinanceMonadDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FinanceMonadDO::getId));
    }

}